package app.structure;

/**
 * Arguments to procedures referenced in the menu
 * 
 * @author eduard
 * 
 */
public class Arg {
	private String name;
	private String type;
	/**
	 * textBox per omisio, comboBox,tabla,DateField o checkBox etc
	 */
	private String editor;
	/**
	 * Un Array de Strings o una query
	 */
	private String source;
	private String value; // Default value
	private boolean visible;
	private boolean enabled;

	public Arg(String name, String type) {
		super();
		this.setName(name);
		this.setType(type);
		iniciarVariables();
	}

	public Arg(String name, String type, String value) {
		super();
		this.setName(name);
		this.setType(type);
		this.setValue(value);
		iniciarVariables();
	}

	private void iniciarVariables() {
		editor = "";
		source = "";
		value = "";
		visible = true;
		enabled = true;
	}

	public Arg() {
		iniciarVariables();
	}

	@Override
	public String toString() {
		return "Arg [name=" + getName() + ", type=" + getType() + ", editor="
				+ getEditor() + ", source=" + getSource() + ", value="
				+ getValue() + ", visible=" + isVisible() + ", enabled="
				+ isEnabled() + "]";
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getType() {
		return type;
	}

	public void setType(String type) {
		this.type = type;
	}

	public String getEditor() {
		return editor;
	}

	public void setEditor(String editor) {
		this.editor = editor;
	}

	public String getSource() {
		return source;
	}

	public void setSource(String source) {
		this.source = source;
	}

	public String getValue() {
		return value;
	}

	public void setValue(String value) {
		this.value = value;
	}

	public boolean isVisible() {
		return visible;
	}

	public void setVisible(boolean visible) {
		this.visible = visible;
	}

	public boolean isEnabled() {
		return enabled;
	}

	public void setEnabled(boolean enabled) {
		this.enabled = enabled;
	}

}
